unit Unit6; 

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, sqlite3conn, sqldb, db, FileUtil, LResources, Forms,
  Controls, Graphics, Dialogs, StdCtrls, Buttons, DbCtrls, ExtCtrls, DBGrids;

type

  { TForm6 }

  TForm6 = class(TForm)
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    Edit1: TEdit;
    Label1: TLabel;
    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
  private
    { private declarations }
  public
    { public declarations }
    function TestEditIsFloat:boolean;
  end;

var
  Form6: TForm6; 

implementation

procedure TForm6.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin

end;

function TForm6.TestEditIsFloat:boolean;
var
  i       : integer;
  b       : string;
  dot_cnt : integer;
begin
  TestEditIsFloat:=false;
//  b:=edit2.Text;
  dot_cnt:=0;
  for i:=1 to length(b) do
  begin
    if not (b[i] in ['0'..'9',',']) then exit;
    if b[i] = ',' then inc(dot_cnt);
  end;
  TestEditIsFloat:=(dot_cnt <= 1) and (trim(b) <> '');
end;

initialization
  {$I unit6.lrs}

end.

